package com.cn.test1.service;

import com.cn.test1.data.CompanyData;
import com.cn.test1.model.CompanyModel;

import java.util.ArrayList;
import java.util.List;

public class
CompanyService {
    public CompanyModel getCompanyModel(){
        CompanyData companyData = new CompanyData();
        CompanyModel companyModel = new CompanyModel();
        companyModel.setLogo(companyData.getLogo());
        companyModel.setName(companyData.getName());
        companyModel.setImg1(companyData.getImg1());
        companyModel.setContent(companyData.getContent());
        companyModel.setExample(companyData.getExample());
        return companyModel;
    }

    public List<CompanyModel> getCompanyModelNavImg(){ //精品案例图片导航图片文本信息
        List<CompanyModel> list = new ArrayList<>();
        CompanyData companyData = new CompanyData();
        for(int i = 0; i < companyData.navimg.length; i++){
            CompanyModel companyModel = new CompanyModel();
            companyModel.setNavimg(companyData.navimg[i]);
            companyModel.setNavcontent(companyData.navcontent[i]);
            list.add(companyModel);
        }
        return list;
    }

    public List<CompanyModel> getCompanyModelNavImg1(){ //精品案例导航文本
        List<CompanyModel> list = new ArrayList<>();
        CompanyData companyData = new CompanyData();
        for(int i = 0; i < companyData.navimg1.length; i++){
            CompanyModel companyModel = new CompanyModel();
            companyModel.setNavimg1((companyData.navimg1[i]));
            list.add(companyModel);
        }
        return list;
    }

    public List<CompanyModel> getCompanyModelNews(){ //新闻中心文本信息
        List<CompanyModel> list = new ArrayList<>();
        CompanyData companyData = new CompanyData();
        for(int i = 0; i < companyData.newscontent1.length; i++){
            CompanyModel companyModel = new CompanyModel();
            companyModel.setNewscontent1(companyData.newscontent1[i]);
            companyModel.setNewscontent2(companyData.newscontent2[i]);
            companyModel.setNewscontent3(companyData.newscontent3[i]);
            companyModel.setNewscontent4(companyData.newscontent4[i]);
            companyModel.setNewsbuttons(companyData.newsbuttons[i]);
            list.add(companyModel);
        }
        return list;
    }

    public List<CompanyModel> getCompanyModelHr(){ //人力资源信息
        List<CompanyModel> list = new ArrayList<>();
        CompanyData companyData = new CompanyData();
        for(int i = 0; i < companyData.hr1.length; i++){
            CompanyModel companyModel = new CompanyModel();
            companyModel.setHr1(companyData.hr1[i]);
            companyModel.setHr2(companyData.hr2[i]);
            companyModel.setHr3(companyData.hr3[i]);
            companyModel.setHr4(companyData.hr4[i]);
            list.add(companyModel);
        }
        return list;
    }


}
